1. Field of the Invention
The present invention relates to image processing, and more particularly, the present invention teaches a method and related device for improving a contrast of an image.
2. Description of the Prior Art
Images of higher contrast are more acceptable to the human eye when it comes to images displayed by a display device or a TV. Thus brightness of images is specifically dealt with during processing, in order to avoid images that are too dark or too bright, among other image display phenomena.
Please refer to FIG. 1. FIG. 1 is a block diagram of an image processing device 4 of the prior art. The image processing device 4 can adjust brightness values for pixels in an image. The image processing device 4 comprises a brightness analysis unit 42, a normal brightness table 41, a brightness-increasing table 47, a brightness-decreasing table 43, a brightness-dispersing table 45, and a brightness gain unit 44. The brightness analysis unit 42 is used for analyzing a distribution of the brightness values for all pixels in the image. The brightness gain unit 44 selects a brightness table from a plurality of brightness tables in accordance with the brightness distribution and adjusts the brightness values of all the pixels in the image.
For example, the brightness analysis unit 42 divides a range of brightness values into three regions: a high brightness region, a mid brightness region, and a low brightness region. A brightness distribution of the image is analyzed according to a distribution among these three brightness regions.
Assume brightness values of pixels in the image analyzed by the brightness analysis unit 42 are mostly in the mid brightness range, indicating a lack of contrast. Therefore, the brightness gain unit 44 selects the brightness-dispersing table 45 according to the analyzed result, and a low brightness region of the image is darkened whilst a high brightness region is brightened. Hence the image has a better contrast. All pixels in the low brightness region are adjusted by a same degree of adjustment, and likewise all pixels in the high brightness region are adjusted by the same degree of adjustment.
Assume that brightness values of pixels of the image analyzed by the brightness analysis unit 42 are mostly in the high brightness range, indicating that the image is too bright. Therefore, the brightness gain unit 44 selects the brightness-decreasing table 43, so that all pixels in the image are adjusted down to have lower brightness values. The brightness values of all pixels are adjusted by the same degree of adjustment.
Assume that brightness values of pixels of the image analyzed by the brightness analysis unit 42 are mostly in the low brightness range, indicating that the image is too dark. Therefore, the brightness gain unit 44 selects the brightness-increasing table 47, so that all pixels in the image are adjusted up to have higher brightness values. The brightness values of all pixels are adjusted by the same degree of adjustment.
Assuming the image analyzed by the analysis unit 42 is normal, the brightness gain unit 44 selects the normal brightness table 41, and leaves the brightness of all pixels unadjusted.
However, only three characteristics are available for analyzing an image in the prior art: a dark image, a bright image, and an image with brightness concentration in the mid brightness range. These three characteristics cannot cover every situation of the image.